<?php

use Phinx\Migration\AbstractMigration;

class ModifyAnalysisStatic extends AbstractMigration
{
    public function change()
    {
        $table = $this->table("analysis_static");
        $table->addColumn('show_uuid', 'integer', ["limit"=>10, "comment"=>"展示用户数", "default"=>"-1", "null"=>false])
              ->addColumn('click_uuid', 'integer', ["limit"=>10, "comment"=>"点击用户数", "default"=>"-1", "null"=>false])
              ->addColumn('day2', 'integer', ["limit"=>10, "comment"=>"次日留存", "default"=>"-1", "null"=>false])
              ->addColumn('day3', 'integer', ["limit"=>10, "comment"=>"三日留存", "default"=>"-1", "null"=>false])
              ->addColumn('day4', 'integer', ["limit"=>10, "comment"=>"四日留存", "default"=>"-1", "null"=>false])
              ->addColumn('day5', 'integer', ["limit"=>10, "comment"=>"五日留存", "default"=>"-1", "null"=>false])
              ->addColumn('day6', 'integer', ["limit"=>10, "comment"=>"六日留存", "default"=>"-1", "null"=>false])
              ->addColumn('day7', 'integer', ["limit"=>10, "comment"=>"七日留存", "default"=>"-1", "null"=>false])
              ->addColumn('status', 'integer', ["limit"=>1, "comment"=>"状态", "default"=>"1", "null"=>false])
              ->addColumn('import', 'integer', ["limit"=>1, "comment"=>"是否为从其它后台导入的静态数据", "default"=>"0", "null"=>false])
              ->save();
    }
}
